import { defineStore } from 'pinia'
// import { getConfig } from '~/api/config'

export const useConfigStore = defineStore(
  'config',
  () => {
    // // 是否显示搜索
    // const searchStatus = ref<boolean>(false)
    // // 是否显示广告
    // const adviceStatus = ref<boolean>(false)
    const moreParams = ref<any>({
      type: undefined,
      name: ''
    })

    function setMoreParams(val: boolean) {
      moreParams.value = val
    }

    return {
      moreParams,
      setMoreParams,
    }
  },
  {
    persist: true, // 关键配置：启用持久化
}
)
